home *** CD-ROM | disk | FTP | other *** search
- global tick, timerval, timeron, smallnil, bignil, mouseVal, beeps
-
- on timerInit
- set timeron to 0
- set timerval to [#hour: 0, #minute: 0, #second: 0]
- startTimer()
- end
-
- on timer
- if tick then
- donum(1, bignil, 1, the hour of timerval)
- donum(4, bignil, 1, the minute of timerval)
- donum(7, bignil, 1, the second of timerval)
- end if
- end
-
- on timerdone
- return not (the hour of timerval or the minute of timerval or the second of timerval)
- end
-
- on timerInc
- inc(timerval, 100, 0)
- set timerval to the result
- timer()
- end
-
- on checkTimer
- if timeron then
- timerdone()
- if not (the result) then
- checkMouse()
- if not (the result) then
- set mouseVal to [#hour: 0, #minute: 0, #second: -1]
- inc(timerval, 100, 1)
- set timerval to the result
- end if
- else
- set timeron to 0
- return 0
- end if
- timerdone()
- if the result then
- set beeps to 15
- set timeron to 0
- end if
- end if
- end
-